#! /bin/bash

cd $SYSCPAR_ROOT/tests/event
make clean

vers='basic v1 v1ns'
nts=`seq 5`
filename='./input/exp3'

for v in `echo $vers`
do
	make precompile_$v
	log=event2_$v.log
	for logusers in {8..15}
	do
		nusers=$((2**$logusers))
		for nt in `echo $nts`
		do	
			echo -n "[nusers=$nusers,nt=$nt] " >> $log
			sed -i "s|int nusers = [0-9]*;|int nusers = $nusers;|" $filename
			echo -e '#include "'$filename'"'"\n" > ./wrapper
			make compile_$v build_$v		

			env VERBOSE=1 NT=$nt OUT=$log ./event_$v 50 m 0 > /dev/null
		done
		echo -e '\n' >> $log
	done
	echo -e '\n' >> $log
done

